import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    // 树形列表数据接口
    getTreeData: {
        url: '/adminc/v1/config_manage/m_entity_categ/get_tree',
        method: 'post'
    },
    // 添加实体分类
    addGeneral: {
        url: '/adminc/v1/config_manage/m_entity_categ/create',
        method: 'post'
    },
    // 删除实体分类
    deleteGeneral: {
        url: '/adminc/v1/config_manage/m_entity_categ/delete',
        method: 'post'
    },
    // 修改实体分类
    updateGeneral: {
        url: '/adminc/v1/config_manage/m_entity_categ/update',
        method: 'post'
    },
    // 实体列表接口
    getGeneralList: {
        url: '/adminc/v1/config_manage/m_entity/entity_list',
        method: 'post'
    },
    // 新增实体列表行数据
    addGeneralRow: {
        url: '/adminc/v1/config_manage/m_entity/create',
        method: 'post'
    },
    // 修改实体列表行数据
    updateGeneralRow: {
        url: '/adminc/v1/config_manage/m_entity/update',
        method: 'post'
    },
    // 删除实体列表行数据
    deleteGeneralRow: {
        url: '/adminc/v1/config_manage/m_entity/delete',
        method: 'post'
    },
    // 获取实体数据-列表
    getEntityList: {
        url: '/adminc/v1/config_manage/m_entity_data/ed_list',
        method: 'post'
    },
    // 实体数据明细-列表
    getEntityDetList: {
        url: '/adminc/v1/config_manage/m_entity_det/et_list',
        method: 'post'
    },
    // 实体属性定义-列表
    getEntityAttributesList: {
        url: '/adminc/v1/config_manage/m_entity_def/ef_list',
        method: 'post'
    },
    // 实体属性定义-保存（新增/修改）
    saveEntityAttributes: {
        url: '/adminc/v1/config_manage/m_entity_def/save',
        method: 'post'
    },
    // 实体属性定义-删除
    deleteEntityAttributes: {
        url: '/adminc/v1/config_manage/m_entity_def/delete',
        method: 'post'
    }
}

export default openBuildService(settings)